<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML PUBLIC "" "">
<f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:w="http://www.apusic.com/jsf/widget" xmlns:layout="http://www.apusic.com/jsf/layout"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:ajax="http://www.apusic.com/jsf/ajax"
	renderKitId="AJAX">
	<w:head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<w:stylesheet src="/css/kmp4.css" type="text/css"></w:stylesheet>
		<w:script src="/javascript/k4.js" type="text/javascript" language="UTF-8"></w:script>
		<script>
		function deleteConfirm(){
			if(cnkGrid.getSelections().length == 0){
				alert("请选择一条记录！");
				return false;
			}
			return showConfirm('你确定要删除吗？');
		}
		function freshme(){
	 		var store=cnkGrid.getStore();
			store.reload(store.lastOptions);
	 	}
	 	function clear(){
		  	codeSearchJsvar.setValue('');
		  	nameSearchJsvar.setValue('');
		  	modulesSearchJsvar.setValue('');
		  }		
		</script>
	</w:head>
	<w:page title="配置项类型一览">
		<layout:panel border="false" autoHeight="true" autoWidth="true" header="false"
			styleClass="k4-form">
			<layout:panel id="viewtoolbar" border="false" autoHeight="true" autoWidth="true">
				<w:form groupId="operator">
					<w:toolBar>
						<w:button label="新建" image="#{request.contextPath}/images/create.gif" immediate="true"
							id="create" />
						<w:separator />
						<w:button label="编辑" image="#{request.contextPath}/images/edit.gif" id="edit" />
						<w:separator />
						<w:button label="删除" image="#{request.contextPath}/images/delete.gif"
							onclick="return deleteConfirm();" id="delete" />
					</w:toolBar>
				</w:form>
			</layout:panel>
			<layout:panel title="搜索条件" border="false" autoHeight="true" autoWidth="true" collapsible="true"
				collapsed="false" styleClass="k4-view-search">
				<w:form groupId="searchcondition" clientValidate="true">
					<layout:panelGrid columns="4" styleClass="k4-view-search" cellpadding="0" cellspacing="0"
						border="1">
						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="类型编码" for="codeSearch" />
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue">
							<w:textField styleClass="k4-form-textfield" id="codeSearch" msgTarget="under"
								jsvar="codeSearchJsvar"></w:textField>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="类型名称" for="nameSearch" />
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue">
							<w:textField styleClass="k4-form-textfield" id="nameSearch" jsvar="nameSearchJsvar"></w:textField>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="所属模块" for="nameSearch" />
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue">
							<w:textField styleClass="k4-form-textfield" id="modulesSearch" jsvar="modulesSearchJsvar"></w:textField>
						</layout:cell>
						<layout:cell colspan="2" styleClass="k4-form-fieldvalue">
							<layout:panelGrid columns="2" cellpadding="0" cellspacing="0">
								<w:button id="query" value="搜索"
									image="#{facesContext.externalContext.requestContextPath}/images/search.gif" />
								<w:button id="reset" value="重置"
									image="#{facesContext.externalContext.requestContextPath}/images/clear.gif"
									immediate="true" onclick="clear();" />
							</layout:panelGrid>
						</layout:cell>
					</layout:panelGrid>
				</w:form>
			</layout:panel>
			<layout:panel border="false" autoHeight="true" autoWidth="true">
				<w:dataGrid id="cnkGrid" paged="true" toolBarPosition="bottom" rows="10" border="false"
					showRowNumber="true" styleClass="k4-view-datagrid" autoHeight="true" singleSelect="true"
					jsvar="cnkGrid">
					<ajax:action event="ondblclick"
						action="#{system_commonKeyTypeListBean.showCommonKeyType}" />
					<w:outputColumn id="typeCode" header="类型编码" sortable="true" width="200"></w:outputColumn>
					<w:outputColumn id="typeName" header="类型名称" width="120"></w:outputColumn>
					<w:outputColumn id="module" header="所属模块" sortable="true" width="120"></w:outputColumn>
					<w:outputColumn id="isLay" header="是否有层级" converter="yesNoFormatter"></w:outputColumn>
					<w:pagingToolbar for="cnkGrid" displayInfo="true" displayMsg="显示 {0} - {1}，共 {2} 条" />
				</w:dataGrid>
			</layout:panel>
		</layout:panel>
	</w:page>
</f:view>